import requests


def demo_get(url):
    r = requests.get(url)

    print(r.text)


def demo_post():
    r = requests.post(url="http://httpbin.org/post", data={"name": "名字"})

    print(r.text)


if __name__ == '__main__':
    demo_get("http://httpbin.org/ip")
    demo_get("https://www.imooc.com")
